func navigateAroundWall() {
    
    if isBlocked && isBlockedLeft && isBlockedRight {
        turnLeft()
        turnLeft()
        
    }
    
    if isBlockedRight && isBlocked {
        turnLeft() 
        moveForward()
    }
    else if isBlockedRight {
        moveForward()
    }
    else {
        turnRight()
        moveForward()
    }
}

while !isOnGem {
    navigateAroundWall()
    
}
collectGem()
